package main

import (
	"fmt"
	"errors"
)

func f1(arg int) (int, error) {
	if (42 == arg) {
		return -1, errors.New("f1 can not work whith 42")
	}
	return arg + 3, nil
}


func main(){
	var ele int = 0
	for _, ele = range []int{7,42} {
		r, e := f1(ele)
		if (nil == e) {
			fmt.Println("f1 worked:", r)
		} else {
			fmt.Println("f1 failed:", e)
		}
	}
	
}
